/*package cn.edu.nju.askinginhand.thirdAPI;

import org.json.JSONException;
import org.json.JSONObject;

import android.os.Bundle;
import android.widget.Toast;

import cn.edu.nju.askinginhand.activity.LoginActivity;

import com.renren.api.connect.android.RequestListener;
import com.renren.api.connect.android.Util;
import com.renren.api.connect.android.exception.RenrenAuthError;
import com.renren.api.connect.android.exception.RenrenError;
import com.renren.api.connect.android.view.ConnectButtonListener;

*//**
 * @author 李勇(yong.li@opi-corp.com) 2010-7-15
 *//*
public class RenrenLoginListener implements ConnectButtonListener,RequestListener {

    private LoginActivity example;
    String sessionKey;

    public RenrenLoginListener(LoginActivity example) {
        this.example = example;
    }

    public void onLogined(Bundle values) {

            //登录成功
                sessionKey=example.getRenren().getSessionKey();
        		Toast.makeText(example, "Login! ", Toast.LENGTH_SHORT).show();

        		Bundle params=new Bundle();
        		params.putString("method", "users.getLoggedInUser");
        		
                params.putString("session_key", sessionKey);
                
                example.asyncRenren.requestJSON(params, this);
         
    }

    public void onLogouted() {
        
    }

    
    public void onException(final Exception exception) {
        exception.printStackTrace();
        

    }

    
    public void onCancelAuth(Bundle values) {

    }

    
    public void onCancelLogin() {
        
    }

    
    
    
    public void onRenrenAuthError(final RenrenAuthError renrenAuthError) {
        
    }

    
    
    //解析json对象
    public String parseID(String json){
    	String returnvalue=null;
		JSONObject jsob=null;

    	try {
    		jsob=new JSONObject(json);
			 returnvalue=jsob.getString("uid");
			
			
		} catch (JSONException e) {
			
			e.printStackTrace();
		}
		return returnvalue;
    	
    	
    	
    }
	public void onComplete(String response) {
	//	Toast.makeText(example, response, Toast.LENGTH_SHORT).show();
		String ID=this.parseID(response);
		
		example.setRenrenloginID(ID);

		// TODO Auto-generated method stub
		
	}

	public void onRenrenError(RenrenError renrenError) {
		// TODO Auto-generated method stub
		
	}

	public void onFault(Throwable fault) {

		
		// TODO Auto-generated method stub
		
	}
}
*/